//
//  PPMediator+PPCache.h
//  PPMediator_Example
//
//  Created by ppss on 2021/6/18.
//  Copyright © 2021 ppss. All rights reserved.
//

#import <PPMediator/PPMediator.h>

NS_ASSUME_NONNULL_BEGIN

@interface PPMediator (PPCache)

//数据是否存在cache中
- (BOOL)PPMediator_ContainsObjectForKey:(NSString *)key;

//存储数据
- (void)PPMediator_SetCacheWithData:(id)data Key:(NSString *)key;

//获取数据
- (id)PPMediator_GetCacheForKey:(NSString *)key;

//移除数据
- (void)PPMediator_RemoveCacheForKey:(NSString *)key;

//移除所有数据
- (void)PPMediator_RemoveAllCache;

//获取缓存数据大小
- (NSInteger)PPMediator_GetAllCacheSize;

#pragma mark - 内存持久化
//存储数据
- (void)PPMediator_SetMemoryCacheWithData:(id)data Key:(NSString *)key;

//获取数据
- (id)PPMediator_GetMemoryCacheForKey:(NSString *)key;
@end

NS_ASSUME_NONNULL_END
